﻿using System;
using System.Web.Services;
using Monkey.Warrenty.Biz;
using Monkey.Warrenty.EntityModel;

namespace MonkeyWarranty.Web.Suppliers
{
    public partial class Groups : System.Web.UI.Page
    {
        #region Properties

        private static SupplierGroupBiz _supplierGroupBiz;
        private static SupplierGroupBiz SupplierGroupManager
        {
            get { return _supplierGroupBiz ?? (_supplierGroupBiz = new SupplierGroupBiz()); }
        }

        #endregion

        protected void Page_Load(object sender, EventArgs e)
        {

        }

        [WebMethod(EnableSession = true)]
        public static object GroupList()
        {
            return SupplierGroupManager.GetAllSupplierGroupsWs();
        }

        [WebMethod(EnableSession = true)]
        public static object CreateGroup(SupplierGroup record)
        {
            return SupplierGroupManager.CreateGroupWs(record);
        }

        [WebMethod(EnableSession = true)]
        public static object UpdateGroup(SupplierGroup record)
        {
            return SupplierGroupManager.UpdateGroupWs(record);
        }

        [WebMethod(EnableSession = true)]
        public static object DeleteGroup(int Id)
        {
            return SupplierGroupManager.DeleteGroupWs(Id);
        }
    }
}